import { local } from "@/assets/map/local"

export let config = {
    showLegendSymbol: true,
    tooltip: {
        trigger: 'item',
        textStyle: {
            fontSize: 14,
            lineHeight: 22,
        },
        position: point => {
            // 固定在顶部
            return [point[0] + 50, point[1] - 20];
        }
    },
    geo: [{

        aspectScale: 0.85, //长宽比
        zoom: 1.16, //缩放
        show: true,
        map: "nanchang",
        type: "map",
        itemStyle: {
            areaColor: "#2E72BF"
        },
        itemStyle: {
            normal: {
                borderColor: '#7ad5ff7f',
                shadowOffsetY: 0,
                shadowBlur: 15,
                areaColor: 'rgba(5,21,35,0.1)'
            }
        }
    }],

    series: [{
        type: 'map',
        aspectScale: 0.85, //长宽比
        zoom: 1.16, //缩放
        mapType: 'nanchang', // 自定义扩展图表类型
        itemStyle: {
            normal: {
                // 背景渐变色
                areaColor: {
                    type: 'linear-gradient',
                    x: 0,
                    y: 300,
                    x2: 0,
                    y2: 0,
                    colorStops: [{
                        offset: 0,
                        color: 'RGBA(19,96,187,0.2)' // 0% 处的颜色
                    }, {
                        offset: 1,
                        color: 'RGBA(7,193,223,0.2)' // 50% 处的颜色
                    }],
                    global: true // 缺省为 false
                },
                borderColor: '#4ECEE6',
                borderWidth: 1,
            },
            emphasis: {
                areaColor: 'rgba(0,242,252,.4)',
                borderColor: 'rgba(0,242,252,.6)',
                borderWidth: 2,
                shadowBlur: 10,
                shadowColor: 'rgba(0,242,252,.4)',
            },
        },
        label: {
            formatter: params => `${params.name}`,
            show: true,
            position: 'insideRight',
            textStyle: {
                fontSize: 14,
                color: '#efefef',
            },
            emphasis: {
                textStyle: {
                    color: '#fff',
                },
            },
        }
    }, {

        type: 'effectScatter',
        coordinateSystem: 'geo',
        symbolSize: 10,
        effectType: 'ripple',
        legendHoverLink: false,
        showEffectOn: 'render',
        rippleEffect: {
            period: 4,
            scale: 4,
            brushType: 'stroke',
        },
        zlevel: 1,
        itemStyle: {
            normal: {
                color: '#99FBFE',
                shadowBlur: 5,
                shadowColor: '#fff',
            },
        },
        data: local,
    }
    ]
};